package com.lcm.oj.lanqiao.year2021.zhenti;

import java.util.Scanner;

/**
 * @author Coder-lcm
 * @date 2021/5/6
 */
public class Tg_最少砝码 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        long n = sc.nextLong();
        sc.close();

        int i, ans;
        for (i = 1, ans = 1; ans < n; i++) {
            ans += Math.pow(3, i);
        }
        System.out.println(i);
    }
}
